#ifndef _CSLIDERBOX_H_
#define _CSLIDERBOX_H_

#include <buola/gui/cwindow.h>
#include <buola/widgets/csliderwidget.h>

namespace buola { namespace gui {

///\addtogroup widgets
///@{

////////////////////////////////////////////////////////////////////////////

/// slider box

///
///
///
////////////////////////////////////////////////////////////////////////////

class CSliderBox : public CSliderWidget<int>
{
public:
//! \name constructor and destructor
//@{
    CSliderBox();
    virtual ~CSliderBox();
//@}

//! \name functions for drawing
//@{
    int CalcPos();
    int CalcValue(int pPos);
//@}

private:
//! \name event handling
//@{
    virtual void OnExpose(const CExposeEvent &pE);
    virtual void OnButtonDown(const CMouseEvent &pE);
    virtual void OnButtonUp(const CMouseEvent &pE);
    virtual void OnMouseIn(const CMouseEvent &pE);
    virtual void OnMouseOut(const CMouseEvent &pE);
    virtual void OnMouseMove(const CMouseEvent &pE);
    virtual void OnMouseWheel(const CMouseEvent &pE);
    virtual void OnFocusIn(const CFocusEvent &pE);
    virtual void OnFocusOut(const CFocusEvent &pE);
    virtual void OnKeyDown(const CKeyEvent &pE);
    virtual void OnStyleChanged(TStyle);

    virtual void OnSWChange();
//@}

private:
    bool mDragging;
    int mDragStart;
    int mDragPos;

    bool mInside;
};

///@}

/*namespace gui*/ } /*namespace buola*/ }

#endif
